<!doctype html>
<html lang="en" data-bs-theme="auto">

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="description" content="">
  <title>栏目边栏显示内容</title>

  <link href="/assets/dist/css/bootstrap.min.css" rel="stylesheet">
  <link rel="stylesheet" href="/assets/icons/font/bootstrap-icons.css">
  <link rel="stylesheet" href="/libs/tree/select-tree.css">
 
  <link href="/css/dashboard.css" rel="stylesheet">
  <script src="/js/jquery.min.js"></script>
  <script src="/libs/tree/select-tree.js"></script>
  <script type="text/javascript" charset="utf-8" src="/ueditor/ueditor.config.js"></script>
  <script type="text/javascript" charset="utf-8" src="/ueditor/ueditor.all.js"> </script>
  <script type="text/javascript" charset="utf-8" src="/ueditor/lang/zh-cn/zh-cn.js"></script>
  
  <style type="text/css">
   

    .edui-editor {
      width: 781px !important;
      min-height: 300px;
      height: auto;
    }

    #edui1_iframeholder {
      min-height: 200px;
    }

    body {
      background-color: #FFFFFF;
    }
  </style>
</head>

<body>

  <div class="container">
    <form class="g-3 mt-1" id="form" method="post">
      <h3>栏目边栏显示内容</h3>
      <div class="row">
        <div class="col-md-6">
          <label for="title" class="form-label">模块名称</label>
          <input type="text" class="form-control" id="title" name="title" value="<% echo<<obj["info"]["title"].to_string(); %>">
        </div>
      </div>  
      <div class="row">
        <div class="col-md-6">
          <label for="title" class="form-label">图文内容（注意宽度）</label>
        </div>
      </div>  
      <div class="row">
        <div class="col-md-6">
          <textarea id="editor" style="width:830px" rows="10" name="content"><% echo << obj["info"]["content"].to_string(); %></textarea>
        </div>
      </div>  
 
       
      <div class="row" style="margin-top: 20px;">
        <div class="col-md-6">
        <br />
        <input type="hidden" name="topicsetid" value="<% echo<<obj["info"]["topicsetid"].to_string(); %>">
        <input type="hidden" name="topicid" value="<%c echo<<obj["topicid"].to_string(); %>">
        <input type="hidden" name="viewtype" value="0">
        <button type="submit" class="btn btn-primary">添加</button>
        <a href="/admin/edittopicside?topicid=<%c echo<<obj["topicid"].to_string(); %>" class="btn btn-link rounded-pill px-3">返回</a>  
        </div>
      </div>
    </form>

  </div>
  
 
 
<div class="modal fade" id="myfiletobigModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <h1 class="modal-title fs-5" id="staticBackdropLabel">提示</h1>
        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
      </div>
      <div class="modal-body">
         文件太大了，请传4M以下的文件！
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">关闭</button>
         
      </div>
    </div>
  </div>
</div> 

  
  <script src="/assets/dist/js/bootstrap.bundle.min.js"></script>
  <script lang="javascript">
    var ue = UE.getEditor('editor');
     function gotourl()
    {
        window.location.href='/admin/edittopicside?topicid=<%c echo<<obj["topicid"].to_string(); %>';
    }
    $("#form").on("submit", function (event) {
      event.preventDefault();
      var data = $(this).serialize();

      var obj=this;  
      //得到序列化数据
      $.ajax({
        url: "/admin/addtopicsideblockpost",
        method: 'post',
        contentType:"application/x-www-form-urlencoded",
        data: data,
        dataType: "json"
        }).done(function(data) {
          if(data.code==0)
          {
             setTimeout("gotourl()",500 );  
          }
        });
    });
    
 
    
 

    $(document).ready(function(e) {
         

 
    });
  </script>
</body>

</html>